package com.shell.provider;

import com.shell.governor.modules.po.PubBusiness;
import com.shell.governor.modules.service.PubBusinessService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PubBusinessProvider {
	@Autowired
	private PubBusinessService pubBusinessService;

	@RequestMapping({ "/pub-business/getAllBus" })
	public List<PubBusiness> getAllBus() {
		return this.pubBusinessService.selectAll();
	}

	@RequestMapping({ "/pub-business/getBusById" })
	public PubBusiness getBusById(String bizId) {
		return (PubBusiness) this.pubBusinessService.selectByKey(bizId);
	}
}
